﻿using System.Configuration;

namespace FileDistributor.Configuration
{
    public class MailNotificationElement : ConfigurationElement
    {
        public MailNotificationElement()
        {
            ElementName = "mailNotification";
        }

        public string ElementName { get; private set; }

        [ConfigurationProperty("from", IsRequired = true)]
        public string From
        {
            get { return (string)this["from"]; }
            set { this["from"] = value; }
        }

        [ConfigurationProperty("to", IsRequired = true)]
        public string To
        {
            get { return (string)this["to"]; }
            set { this["to"] = value; }
        }

        [ConfigurationProperty("subject", IsRequired = true)]
        public string Subject 
        {
            get { return (string)this["subject"]; }
            set { this["subject"] = value; } 
        }

        [ConfigurationProperty("message", IsRequired = true)]
        public string Message
        {
            get { return (string)this["message"]; }
            set { this["message"] = value; }
        }

    }


}
